//g++ -std=c++11 -L. test_so.cc `pkg-config --cflags --libs opencv` -lwebrtc_so 

#include <opencv2/highgui/highgui.hpp>
#include "opencv2/imgproc/imgproc.hpp"
#include <unistd.h>
#include "webrtc_client.h"

int main(int argc, char **argv){
    start_webrtc_video();
    sleep(3);
    cv::Mat image = cv::imread("2.jpg");
    cv::Mat image_, image1_;
    cv::cvtColor(image, image_, cv::COLOR_BGR2RGB);
    cv::Mat image1 = cv::imread("3.jpg");
    cv::cvtColor(image1, image1_, cv::COLOR_BGR2RGB);
    while(true){
        send_webrtc_image(image_.data, image.cols, image.rows);
        usleep(100 * 1000);
        send_webrtc_image(image1_.data, image.cols, image.rows);
        usleep(100 * 1000);
    }
    sleep(40);
    stop_webrtc_video();
    return 0;
}
